<!doctype html>
<html>
<head>
<title>新闻信息管理</title>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<link href="css/index.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/login.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
</head>

<body>
<?php
 include('config/config.php');     
 $conn = mysqli_connect(HOST,USER,PASS,DBNAME) or die("数据库服务器连接错误".mysqli_connect_error());      //连接数据库
mysqli_set_charset($conn,"utf8");                    //设置编码格式
$username = $_GET['username'];                                     //用get方法接收
$sql = "select * from root where username='$username'";       
$result = mysqli_query($conn,$sql);                  
$row = mysqli_fetch_object($result);                 
?>
<div class="bgimg"></div>
<div class="content">
    <div class="con_left">
        <div class="con_left1">
            <div class="con_header" style=""><div class="title" style=""><span>新闻管理</span></div></div>
            <div class="">
                <ul><li><a href="add_news.php">添加新闻信息</a></li></ul><hr/>
				<ul><li><a href="search_news.php">查询新闻信息</a></li></ul><hr/>
                <ul><li><a href="adduser.php">添加新用户</a></li></ul>
                <ul><li><a href="shouye.php">返回前端</a></li></ul>
            </div>
        </div>
    </div>
    <div class="con_right">
        <div class="">
            <div class="">
                <div class="con_header"><div class="title"><span>后台管理系统</span></div></div>
                <div style="margin-top:100px;margin-left: 100px;">
                   <br>
	<p>用户添加</p>
	<form name="form2" action="dealregister.php" method="post" >
		<table border="1" width="100%">
			<tr>
				<td>用户名</td>
				<td><input type="text" name="uname" class="input2" onkeyup="this.value=this.value.replace(/[^\w_]/g,'');" placeholder="仅限制数字和英文"></td>
			</tr>
			<tr>
				<td>用户密码</td>
				<td><input type="password" name="upass" class="input2" onkeyup="this.value=this.value.replace(/[^\w_]/g,'');" placeholder="仅限制数字和英文"></td>
			</tr>
			<tr><td>
				 
      <p>验证码: <img id="captcha_img" border='1' src='code.php?r=echo rand(); ?>' style="width:100px; height:30px" />
        <a href="javascript：void(0)" onclick="document.getElementById('captcha_img').src='code.php?r='+Math.random()">换一个</a>
      </p>
      <input type="text" name='code' value=''placeholder="请输入验证码:"/>

			</td></tr>
			<tr>
				<td colspan="2" align="center">
					<input type="submit" name="" value="添加" class="input1">
					<input type="reset" name="" value="重置" class="input1">
				</td>
			</tr>
		</table>
	</form>
                </div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>

</body>
</html>